<?php


namespace app\api\controller;


use app\api\logic\GoodsLogic;
use app\common\controller\BaseApiController;
use plugin\colecms\app\logic\AdLogic;

class HomeController extends BaseApiController
{
    protected $noNeedLogin = ["*"];

    public function index()
    {
        $goodsLogic = new GoodsLogic();
        $adLogic = new AdLogic();
        return $this->success([
            "homeGoods" => $goodsLogic->homeGoods(),
            "recommendCateGoods" => $goodsLogic->recommendCateGoods(),
            "advList" => $adLogic->getByPosition("MOBILE_INDEX"),
        ]);
    }
}